<?php

class CommandLineException extends TinyMVCException {

	protected function getTextTrace(Exception $exception = null) {
		if(is_object($this) && ($exception == null)) {
		 $exception = $this;
		}

		$trace = "\n\n" . get_class($exception) . ':  ' . $exception->getMessage() . "\n\nThrown by: " . $exception->getFile() . '  at line: ' . $exception->getLine() . "\n";
		return $trace;
	}

	public function handleException(Exception $exception = null) {
		print $this->getTextTrace();
	}
}
